package com.example.dziennikposilkow;

import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ProduktyZbozowe extends DziennikMainActivity {
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.activity_produkty_zbozowe);
        
        final Button button_maki_kasze_ziarna = (Button) findViewById(R.id.buttonMakiKaszeZiarna);
		button_maki_kasze_ziarna.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {

				String str = "MakiKaszeZiarna"; //Data you want to send        
				Intent intent = new Intent(ProduktyZbozowe.this, TabelaProdukty.class);
				intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
				v.getContext().startActivity(intent);
				
			}
			
		});
		
		  final Button button_ryz_makarony = (Button) findViewById(R.id.buttonRyzMakarony);
			button_ryz_makarony.setOnClickListener(new View.OnClickListener() {
				public void onClick(View v) {

					String str = "RyzMakarony"; //Data you want to send        
					Intent intent = new Intent(ProduktyZbozowe.this, TabelaProdukty.class);
					intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
					v.getContext().startActivity(intent);
					
				}
				
			});
			
			  final Button button_pieczywo = (Button) findViewById(R.id.buttonPieczywo);
				button_pieczywo.setOnClickListener(new View.OnClickListener() {
					public void onClick(View v) {

						String str = "Pieczywo"; //Data you want to send        
						Intent intent = new Intent(ProduktyZbozowe.this, TabelaProdukty.class);
						intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
						v.getContext().startActivity(intent);
						
					}
					
				});
				
				  final Button button_produkty_sniadaniowe = (Button) findViewById(R.id.buttonProduktySniadaniowe);
					button_produkty_sniadaniowe.setOnClickListener(new View.OnClickListener() {
						public void onClick(View v) {

							String str = "ProduktySniadaniowe"; //Data you want to send        
							Intent intent = new Intent(ProduktyZbozowe.this, TabelaProdukty.class);
							intent.putExtra("name",str); //here you will add the data into intent to pass bw activites
							v.getContext().startActivity(intent);
							
						}
						
					});
		
		
	}
}
